unit ArtikelFrm;

interface

uses
  Windows, Classes, SysUtils,
  Controls, StdCtrls, ExtCtrls, ActnList, StdActns,
  DB, DBClient, alBaseDataSet, MConnect,
  Forms, SifrantFrm,
  PoslovanjeSrv_TLB,
  cxClasses, cxControls, cxGraphics, cxContainer, cxStyles, cxEditRepositoryItems,
  cxCustomData, cxData, cxFilter,
  cxEdit, cxDBEdit, cxTextEdit, cxDBData,
  cxGrid, cxGridLevel, cxGridCustomView, cxGridCustomTableView, cxGridTableView,
  cxGridBandedTableView, cxGridDBBandedTableView, cxDBEditRepository,
  cxMaskEdit, cxDropDownEdit, cxLookupEdit, cxDBLookupEdit,
  cxDBLookupComboBox, cxCurrencyEdit, ImgList, cxDataStorage, kdbstruc, kdbinfo;

type
  TfrmArtikel = class(TfrmSifrant)
    scnSkupina: TSharedConnection;
    cdsSkupina: TBaseDataSet;
    dtsrcSkupina: TDataSource;
    scnDDV: TSharedConnection;
    cdsDDV: TBaseDataSet;
    dtsrcDDV: TDataSource;
    scnEnotaMere: TSharedConnection;
    cdsEnotaMere: TBaseDataSet;
    dtsrcEnotaMere: TDataSource;
    lblCrtnaKoda: TLabel;
    lblSkupina: TLabel;
    lblDDV: TLabel;
    lblEnotaMere: TLabel;
    grdtvMainSkupinaNaziv: TcxGridDBBandedColumn;
    grdtvMainDDVVrednost: TcxGridDBBandedColumn;
    grdtvMainEnotaMereNaziv: TcxGridDBBandedColumn;
    grdtvMainCrtnaKoda: TcxGridDBBandedColumn;
    edtCrtnaKoda: TcxDBTextEdit;
    lkpcbEnotaMere: TcxDBLookupComboBox;
    lkpcbDDV: TcxDBLookupComboBox;
    lkpcbSkupina: TcxDBLookupComboBox;
    rpstMainCrtnaKoda: TcxEditRepositoryTextItem;
    rpstMainEnotaMereNazivEdit: TcxEditRepositoryLookupComboBoxItem;
    rpstMainDDVVrednostEdit: TcxEditRepositoryLookupComboBoxItem;
    rpstMainSkupinaNazivEdit: TcxEditRepositoryLookupComboBoxItem;
    lblCena: TLabel;
    rpstMainCena: TcxEditRepositoryCurrencyItem;
    lkpcbCena: TcxDBCurrencyEdit;
    grdtvMainCena: TcxGridDBBandedColumn;
    rpstMainEnotaMereNaziv: TcxEditRepositoryTextItem;
    rpstMainDDVVrednost: TcxEditRepositoryTextItem;
    rpstMainSkupinaNaziv: TcxEditRepositoryTextItem;
  private
    { Private declarations }
  protected
    procedure Deinitialize; override;
    procedure DoDBRefresh; override;
    procedure Initialize; override;
  public
    { Public declarations }
  end;

var
  frmArtikel: TfrmArtikel;

implementation

uses
  MainFrm;

{$R *.dfm}

{ TfrmArtikel }

procedure TfrmArtikel.Deinitialize;
begin
  cdsDDV.Close;
  cdsEnotaMere.Close;
  cdsSkupina.Close;
  inherited;
end;

procedure TfrmArtikel.DoDBRefresh;
begin
  inherited;
  cdsSkupina.Refresh;
  cdsEnotaMere.Refresh;
  cdsDDV.Refresh;
end;

procedure TfrmArtikel.Initialize;
begin
  inherited;
  cdsSkupina.Open;
  cdsEnotaMere.Open;
  cdsDDV.Open;
end;

end.
